cmake_minimum_required(VERSION 3.5)

list( APPEND CMAKE_MODULE_PATH ${EOSIO_CDT_BIN} )
include( EosioCDTMacros )

macro(add_cdt_unit_test TEST_NAME)
   add_native_executable(${TEST_NAME} ${TEST_NAME}.cpp)
   target_compile_options(${TEST_NAME} PRIVATE -fno-cfl-aa)
endmacro()

add_cdt_unit_test(asset_tests)
add_cdt_unit_test(binary_extension_tests)
add_cdt_unit_test(crypto_tests)
add_cdt_unit_test(datastream_tests)
add_cdt_unit_test(fixed_bytes_tests)
add_cdt_unit_test(name_tests)
add_cdt_unit_test(rope_tests)
add_cdt_unit_test(serialize_tests)
add_cdt_unit_test(string_tests1)
add_cdt_unit_test(string_tests2)
add_cdt_unit_test(symbol_tests)
add_cdt_unit_test(system_tests)
add_cdt_unit_test(rope_tests)
add_cdt_unit_test(print_tests)
add_cdt_unit_test(time_tests)
add_cdt_unit_test(varint_tests)

target_compile_options( rope_tests PUBLIC -g )
add_subdirectory(test_contracts)
